1. Technical Field
This disclosure relates to converters that generate an analog output indicative of a time-encoded signal.
2. Description of Related Art
Time-encoded signals may be used in many applications to efficiently encode and transmit information. For the purpose of this disclosure, a time-encoded signal is defined to be a signal that, at any given time, represents one state of two or more states, with the relationship between an encoding parameter and a timebase used to encode a value of interest. Encoding parameters may characterize time intervals separating transitions between the states. Examples of encoding parameters and timebases include pulse-width, period, duty cycle, frequency, and phase.
Pulse width characterizes the time interval during which the signal continually represents a first state. Period characterizes the time interval separating successive recurrences of a transition by which the signal enters a first state. Duty cycle is a unit-less parameter that characterizes the ratio of the pulse-width divided by the period. Frequency, commonly expressed in units of cycles per second or Hertz (Hz), characterizes the rate of recurrence of successive transitions by which the signal enters a first state, and may be calculated by dividing one by the period. Phase, commonly expressed in units of degrees or radians, characterizes the relationship in time between the time-encoded signal and a timebase.
A time-encoded signal may be a digital voltage signal with precisely two predefined states characterized by a logic high voltage level and a logic low voltage level.
FIGS. 1A, 1B, 1C, 1D, and 1E show examples of digital voltage signals using these encoding parameters to time-encode a range of values. FIG. 1A shows an example of a time-encoded signal using variable duty cycle and constant period. FIG. 1B shows an example of a time-encoded signal using variable pulse-width high and constant pulse-width low. FIG. 1C shows an example of a time-encoded signal using variable period and constant duty cycle. FIG. 1D shows an example of a time-encoded signal using variable frequency and constant duty cycle. FIG. 1E shows an example of a time-encoded signal comprising an encoding signal having variable phase and a timebase having constant phase.
Pulse-width modulated (PWM) signals are an example of time-encoded signals wherein values are encoded using the pulse-width (FIG. 1B) or duty cycle (FIG. 1A) of the signal. For the example of a PWM signal implemented as a digital voltage signal, pulse-width high is the time-related parameter characterizing the interval when PWM signal is in the logic high voltage state, and pulse-width low is the time-related parameter characterizing the interval when the PWM signal is in the logic low voltage state. In this example, the period is defined to be the interval between successive low-to-high (or high-to-low) transitions, that is also equal to the sum of the pulse-width high plus the pulse-width low.
The duty cycle of a PWM signal may be defined as the ratio of the pulse-width high divided by the period. Examples of PWM signals include signals that maintain a constant period while varying the pulse-width high, pulse-width low, and duty cycle (FIG. 1A). Other examples include PWM signals that maintain a constant pulse-width low (FIG. 1B) while varying the pulse-width high and period, and PWM signals that maintain a constant pulse-width high while varying the pulse-width low and period.
In many applications, it is desirable to convert a time-encoded signal into an analog quantity, such as a voltage, current, power, impedance, temperature, speed, mechanical position, etc. For example, a wide variety of microcontrollers and other logic devices commonly include pulse-width modulated (PWM) outputs with programmable duty cycle for use in controlling analog voltages. Further examples include controlling the brightness of an LED based upon the duty cycle of a signal, controlling the position of a mechanical servo based upon the pulse-width of a signal, and controlling the speed of a motor based upon the frequency of a signal.
In many such applications, it is further desirable to provide a useful value at an analog output, even when the input signal is not present, as when other components in a system are disabled to save power, or during some time interval after power is initially applied to a system. For example, in some applications the analog output needs to be centered within the analog output range when power is first applied to the system, so that the output may be subsequently adjusted in either direction. In other applications, a zero volt output is required during power-up, and still others require a high-impedance output when an input signal is not present.
FIG. 2 shows an example of a prior art circuit using a low-pass filter 203 and a buffer amplifier 207 to generate an analog voltage output 208 in response to the duty cycle of a pulse-width modulated (PWM) digital voltage input signal at signal input 202. Assuming a continuous PWM input signal, such as a waveform 201 with a fixed duty cycle, the average voltage at the signal input 202 may be determined by the input duty cycle, input logic high voltage, and input logic low voltage. The voltage at a filter output 206 and the analog voltage output 208 may be the average voltage of the input signal with an undesired saw tooth-shaped ripple voltage superimposed upon it at the frequency of the PWM input, such as in a waveform 209. The magnitude of undesired voltage ripple present at the filter output 206 and the analog voltage output 208 may be determined by the ratio of the bandwidth of the low-pass filter 203 to the frequency of the PWM signal at the signal input 202, with the bandwidth of the low pass filter 203 determined by the values of a resistor 204 and a capacitor 205.
For applications requiring high accuracy, a very low bandwidth filter and very high frequency input may be required to sufficiently reduce this undesired ripple. Assuming the bandwidth of the low pass filter 203 is low enough that the undesired ripple at the filter output 206 and the analog voltage output 208 is sufficiently small to achieve the desired accuracy, the analog voltage output 208 may be determined by the average value of the input voltage at the signal input 202, and thus may effectively be determined by the input duty cycle, input logic high voltage, and input logic low voltage.
The approach shown in FIG. 2 may suffer from a number of limitations in terms of speed, accuracy, and flexibility. The bandwidth of the low-pass filter 203 may limit the speed of the circuit, and may be much slower than the PWM input frequency. This problem may be made worse by the large ratios between filter bandwidth and PWM frequency that may be required in high-accuracy applications. In many applications, the need to overcome this speed limitation may require the use of undesirably large component values for the resistor 204 and the capacitor 205 and an undesirably high-frequency for the PWM input signal waveform 201, increasing system cost and complexity.
The accuracy and stability of the output of the circuit in FIG. 2 may further be limited by the accuracy and stability of the logic high and logic low voltage levels of the input signal at the signal input 202. Such logic levels may be derived from logic power supply voltages that may suffer from poor initial accuracy and large temperature drift.
Another problem with this circuit may be that it offers no convenient way to provide a useful analog output at the analog voltage output 208 when power is initially applied to the system, or in the presence of prolonged intervals between transitions of the input signal at the signal input 202, for example, when the source of the PWM input signal is powered-down.
Other circuits (e.g. those shown in U.S. Pat. No. 6,208,280 and U.S. Pat. No. 7,408,392) may employ current sources and capacitors to convert a PWM signal to an analog voltage. These approaches may represent an improvement over the low-pass filter of FIG. 2 in terms of speed and accuracy, but may suffer from other limitations in terms of flexibility. They may require the continuous presence of a PWM input signal of constant frequency. The values of current sources and capacitors may also need to be chosen to accommodate a narrow range of PWM input frequencies.
Circuits for converting a time-encoded signal into an analog quantity may suffer from undesirable limitations in terms of speed and accuracy. Such circuits may not be flexible enough to work with a wide variety of input signals or to provide a useful analog output when an input signal is not present or when a parameter of an input signal is outside of a normal operating range. What is needed is a circuit for converting a time-encoded signal into an analog quantity that is advantageous in terms of speed, accuracy, and flexibility.